rails generate
命令手册Generate new Rails templates in an existing project. More information: https://guides.rubyonrails.org/command_line.html#rails-generate.
rails generate
rails generate model {{Post}} {{title:string}} {{body:text}}
rails generate controller {{Posts}} {{index}} {{show}} {{new}} {{create}}
rails generate migration {{AddCategoryToPost}} {{category:string}}
rails generate scaffold {{Post}} {{title:string}} {{body:text}}